package com.foreknow.mapping;

import com.foreknow.bean.User;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UserMapping implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        User user = new User();
        user.setAdminId(rs.getInt("adminid"));
        user.setAdminName(rs.getString("adminname"));
        user.setPassword(rs.getString("password"));
        return user;
    }
}
